package idl

type RunConfig struct {
	MaxCpuTime       int
	MaxRealTime      int
	MaxMemory        int
	MaxStack         int
	MaxProcessNumber int
	MaxOutPutSize    int
	ExePath          string
	InputPath        string
	OutputPath       string
	ErrorPath        string
	LogPath          string
	Args             []string
	Env              []string
	SecCompRuleName  string
	Uid              int
	Gid              int
}

type RunResult struct {
	CpuTime    int
	RealTime   int
	Memory     int
	Signal     int
	ExitCode   int
	ErrorCode  int
	Output     string
	ResultCode int
}

type JudgeResult struct {
	Sid      string
	Passed   []RunResult
	UnPassed []RunResult
}

type TestCase struct {
	UserOutFilename string
	TestInPath      string
	TestOutPath     string
}

type JMessage struct {
	Sid        string `json:"sid" binding:"required"`
	Src        string `json:"src" binding:"required"`      //就是提交上来的文件
	Language   string `json:"language" binding:"required"` //c,cpp.java,py2(可以支持golang和node,但是并不完善)
	MaxCPUTime int    `json:"max_cpu_time" binding:"required"`
	MaxMemory  int    `json:"max_memory" binding:"required"`
	TestCaseID string `json:"test_case_id" binding:"required"`
}

type SimRequest struct {
	Sid    int64
	simSid []int64
}
